package com.lu.entity;

public class Page {
    private int total; // 总条目数
    private int count; // 每页条目数
    private int pages; // 总页数
    private int currentPage; // 当前所在页码

    public Page() {
    }

    public Page(int total, int count) {
        this.total = total;
        this.count = count;
        this.pages = total / count + (total % count == 0 ? 0 : 1);
        this.currentPage = 1; // 默认是第一页
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }
}
